<?php


namespace app\common\model;
use app\common\services\MoneyAccount;
use think\Model;

class MoneyDetailed extends Model
{
    public static function index($map,$order,$size='10', $field = "*")
    {
        return MoneyDetailed::where($map)
            ->order($order)
            ->field($field)
            ->paginate($size, false, ['query' => request()->param()]);
    }

    public static function num($map)
    {
        return MoneyDetailed::where($map)->sum('money');
    }
}